<?php
namespace App\Http\Controllers\Property;

use App\Common\json;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;


class  CircleController extends Controller{



    //更新
    public function Circleupdate(Request $request){
        if($request ->isMethod('post')){
            $arr  = (object)array();
            $user_id              = $request ->input('user_id');
            $image                = $request ->input('image');
            $data                 = DB::table('user')
                                  ->where('user_id',$user_id)
                                  ->update(['circle_image'=>$image]);
            if($data == true){
                return json::json('success', '邻里圈图片修改成功', $arr);
            }else{
                return json::json('failure','邻里圈图片修改失败',$arr);
            }
        }
    }

}